package com.fxhy.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.fxhy.bean.LicenceImgInfo;
import com.fxhy.repository.LicenceImgInfoRepository;

@Service
public class LicenceImgInfoService {
	@Autowired
	private LicenceImgInfoRepository   licenceImgInfoRepository;

	public LicenceImgInfo findLicenceByUserId(Integer userId) {
		return licenceImgInfoRepository.findByUserId(userId);
	}

	public LicenceImgInfo saveLicence(LicenceImgInfo licence) {
		return licenceImgInfoRepository.saveAndFlush(licence);
	}
}
